export function extend<T, K>(obj: T, extension: K) {
    for (let key in obj) {
        // @ts-ignore
        extension[key] = obj[key];
    }
    // @ts-ignore
    extension['addObserver'] = obj['addObserver'];
    // @ts-ignore
    extension['notify'] = obj['notify'];
}